package de.tabiteuea.gui.handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

/**
 * Handles about page
 * 
 * @author Sebastian Lippert
 * 
 */

public class AboutHandler extends AbstractHandler {

	/**
	 * Execute handler
	 */

	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {

		// open dialog with basic informations about Tabiteuea
		IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench()
				.getActiveWorkbenchWindow();
		MessageDialog.openInformation(activeWorkbenchWindow.getShell(),
				Messages.AboutHandler_title, Messages.AboutHandler_message);
		return null;
	}

}
